#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QPainter>
#include<QPaintEvent>


QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(Qt::Orientations orientation,QWidget *parent = nullptr);
    ~Widget();
protected:
    virtual void paintEvent(QPaintEvent *event) override;

private:
    Ui::Widget *ui;
    //背景色
    QColor background{Qt::white};
    //文本和刻度的颜色
    QColor textColor{"#606060"};
    //方向
    Qt::Orientations m_orientation;
    //字体
    QFont font{"微软雅黑",18};
};
#endif // WIDGET_H
